package com.fsy.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fsy.entities.Userchecks;
import com.fsy.service.UserchecksService;
import com.fsy.mapper.UserchecksMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
* @author 凡凡
* @description 针对表【userchecks】的数据库操作Service实现
* @createDate 2022-04-29 11:18:39
*/
@Service
public class UserchecksServiceImpl extends ServiceImpl<UserchecksMapper, Userchecks>
    implements UserchecksService{

    @Resource
    private UserchecksMapper userchecksMapper;

    @Override
    public Userchecks getTodaySign(Integer userId) {
        return baseMapper.getTodaySign(userId);
    }

    @Override
    public List<Userchecks> selectAllUserChecks(Userchecks userchecks) {
        userchecks.setPage((userchecks.getPage()-1)*userchecks.getLimit());
        return userchecksMapper.selectAllUserChecks(userchecks);
    }

    @Override
    public int getCountUserchecks(Userchecks userchecks) {
        return userchecksMapper.getCountUserchecks(userchecks);
    }
}




